<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="generator" content="PHPDoctor 2RC4 (http://peej.github.com/phpdoctor/)">
<meta name="when" content="Mon, 02 May 2011 02:46:55 +0000">

<link rel="stylesheet" type="text/css" href="../stylesheet.css">
<link rel="start" href="../overview-summary.html">

<title>request (Cornice)</title>

</head>
<body id="definition" onload="parent.document.title=document.title;">

<div class="header">
<h1>Cornice</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="../cornice/package-summary.html">Package</a></li>
<li class="active">Class</li>
<li><a href="../cornice/package-tree.html">Tree</a></li>
<li><a href="../overview-files.html">Files</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../todo-list.html">Todo</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../cornice\request.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<div class="qualifiedName">cornice\request</div>
<a href="../source/request.php.html#line14" class="location">request.php at line 14</a>

<h1>Class request</h1>

<pre class="tree"><strong>request</strong><br /></pre>

<hr>

<p class="signature">public  class <strong>request</strong></p>

<div class="comment" id="overview_description"><p>Class processing HTTP request</p></div>

<dl>
<dt>Author:</dt>
<dd>Nicola Dinh</dd>
<dt>Version:</dt>
<dd>2011.04.2217</dd>
</dl>
<hr>

<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#__construct()">__construct</a>()</p><p class="description">Default instance level constructor
Just decorative, should not be called due to having only static methods</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#get_form_var()">get_form_var</a>(string name)</p><p class="description">Get form parameter</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#get_module_name()">get_module_name</a>()</p><p class="description">Get module name in HTTP request</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#get_page_name()">get_page_name</a>()</p><p class="description">Get page name specified in URL</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#get_query_string()">get_query_string</a>()</p><p class="description">Get query string</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#get_url_var()">get_url_var</a>(string name)</p><p class="description">Get URL parameter</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#get_validated_url()">get_validated_url</a>()</p><p class="description">Get validated URL after reformatting</p></td>
</tr>
<tr>
<td class="type">static  string</td>
<td class="description"><p class="name"><a href="#http_method()">http_method</a>()</p><p class="description">Get HTTP request method</p></td>
</tr>
<tr>
<td class="type">static  void</td>
<td class="description"><p class="name"><a href="#initialise()">initialise</a>()</p><p class="description">Initialise & parse HTTP request</p></td>
</tr>
<tr>
<td class="type">static  boolean</td>
<td class="description"><p class="name"><a href="#is_get()">is_get</a>()</p><p class="description">Check either is HTTP GET method</p></td>
</tr>
<tr>
<td class="type">static  boolean</td>
<td class="description"><p class="name"><a href="#is_post()">is_post</a>()</p><p class="description">Check either is HTTP POST method</p></td>
</tr>
</table>

<h2 id="detail_method">Method Detail</h2>
<a href="../source/request.php.html#line29" class="location">request.php at line 29</a>

<h3 id="__construct()">__construct</h3>
<code class="signature">public  void <strong>__construct</strong>()</code>
<div class="details">
<p>Default instance level constructor
Just decorative, should not be called due to having only static methods</p></div>

<hr>

<a href="../source/request.php.html#line166" class="location">request.php at line 166</a>

<h3 id="get_form_var()">get_form_var</h3>
<code class="signature">public static  string <strong>get_form_var</strong>(string name)</code>
<div class="details">
<p>Get form parameter</p><dl>
<dt>Parameters:</dt>
<dd>name - The name of parameter in form (by POST)</dd>
<dt>Returns:</dt>
<dd>The value of param or 'null' if no such param</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line58" class="location">request.php at line 58</a>

<h3 id="get_module_name()">get_module_name</h3>
<code class="signature">public static  string <strong>get_module_name</strong>()</code>
<div class="details">
<p>Get module name in HTTP request</p><dl>
<dt>Returns:</dt>
<dd>The module name</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line98" class="location">request.php at line 98</a>

<h3 id="get_page_name()">get_page_name</h3>
<code class="signature">public static  string <strong>get_page_name</strong>()</code>
<div class="details">
<p>Get page name specified in URL</p><dl>
<dt>Returns:</dt>
<dd>The page name</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line198" class="location">request.php at line 198</a>

<h3 id="get_query_string()">get_query_string</h3>
<code class="signature">public static  string <strong>get_query_string</strong>()</code>
<div class="details">
<p>Get query string</p><dl>
<dt>Returns:</dt>
<dd>The value of query string in URL</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line157" class="location">request.php at line 157</a>

<h3 id="get_url_var()">get_url_var</h3>
<code class="signature">public static  string <strong>get_url_var</strong>(string name)</code>
<div class="details">
<p>Get URL parameter</p><dl>
<dt>Parameters:</dt>
<dd>name - The name of parameter in URL</dd>
<dt>Returns:</dt>
<dd>The value of param or 'null' if no such param</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line139" class="location">request.php at line 139</a>

<h3 id="get_validated_url()">get_validated_url</h3>
<code class="signature">public static  string <strong>get_validated_url</strong>()</code>
<div class="details">
<p>Get validated URL after reformatting</p><dl>
<dt>Returns:</dt>
<dd>The formatted relative URL</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line174" class="location">request.php at line 174</a>

<h3 id="http_method()">http_method</h3>
<code class="signature">public static  string <strong>http_method</strong>()</code>
<div class="details">
<p>Get HTTP request method</p><dl>
<dt>Returns:</dt>
<dd>The name of method, either 'post', or 'get',...</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line205" class="location">request.php at line 205</a>

<h3 id="initialise()">initialise</h3>
<code class="signature">public static  void <strong>initialise</strong>()</code>
<div class="details">
<p>Initialise & parse HTTP request</p></div>

<hr>

<a href="../source/request.php.html#line190" class="location">request.php at line 190</a>

<h3 id="is_get()">is_get</h3>
<code class="signature">public static  boolean <strong>is_get</strong>()</code>
<div class="details">
<p>Check either is HTTP GET method</p><dl>
<dt>Returns:</dt>
<dd>'true' if is HTTP GET, 'false' otherwise</dd>
</dl>
</div>

<hr>

<a href="../source/request.php.html#line182" class="location">request.php at line 182</a>

<h3 id="is_post()">is_post</h3>
<code class="signature">public static  boolean <strong>is_post</strong>()</code>
<div class="details">
<p>Check either is HTTP POST method</p><dl>
<dt>Returns:</dt>
<dd>'true' if is HTTP POST, 'false' otherwise</dd>
</dl>
</div>

<hr>

<div class="header">
<h1>Cornice</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="../cornice/package-summary.html">Package</a></li>
<li class="active">Class</li>
<li><a href="../cornice/package-tree.html">Tree</a></li>
<li><a href="../overview-files.html">Files</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../todo-list.html">Todo</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../cornice\request.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>

</body>

</html>